﻿//var agentRole="0";
var agentlists="";
var agentgetflag="0";
var entques="";
var entgetflag="0";

//状态变化
function OnPlatCallState(state){
     //
}

//设置座席掉线server状态保持时间
function setKeepTimes(outseconds){
	try{
		if(outseconds%1 === 0){
			//
		}else{
			alert("不为数字，请重新输入");
			return false;
		}
	}catch(err){
		alert("不为数字，请重新输入");
		return false;
	}
	FlashAgentX.outSecond = outseconds;
}
//鉴权成功事件
function OnAuthSuccess(calltype,telno,callid,queid,uudata){
     //alert("calling:"+calltype+":"+telno+":"+callid+":"+queid+":"+uudata);
}
//振铃事件
function OnCalling(calltype,telno,callid,queid,uudata){
     //alert("calling:"+calltype+":"+telno+":"+callid+":"+queid+":"+uudata);
}

//接通事件
function OnCallConnect(calltype,telno,callid,queid,recfile,uudata){
	//alert("conn:"+calltype+":"+telno+":"+callid+":"+queid+":"+recfile+":"+uudata);
}

//挂机事件
function OnCallHangup(calltype){
	//alert("hangup:"+calltype); 
}

//设置登录信息
function sfc_platagentinfo(entId,entPwd, agentid,agentpwd,extension,acgateserverurl){
	FlashAgentX.loadConfig(entId,entPwd,acgateserverurl,acgateserverurl,agentid,agentpwd,extension);
}

//签入
function checkin(){
	FlashAgentX.checkin();
}

//签出
function checkout(){
	FlashAgentX.checkout();
}

//上线
function online(){
	FlashAgentX.online()
}

//下线
function offline(){
	FlashAgentX.offline();
}

//设置座席状态
function setSeatState(type){
	//0 示闲，1 示忙，2 小休
	FlashAgentX.setSeatState(type);
}

//呼出外线
function calluser(telno,uudata){
	FlashAgentX.calluser(telno, uudata);
}

//挂断电话
function dropcall(){
	FlashAgentX.dropcall();
}

//咨询外线
function consult(telno){
	FlashAgentX.consult(telno, ""); //calluser 实现呼出，咨询等，因此这里统一一个函数
}

//咨询座席
function callseat(agentid){
	FlashAgentX.callseat(toseatno);
}

//
function droptouser(){
	FlashAgentX.droptouser();
}

function freeseat(){
	FlashAgentX.freeseat();
}

function holduser(){
	FlashAgentX.holduser();
}

function unholduser(){
	FlashAgentX.unholduser();
}

function transcall(){
	FlashAgentX.transcall();
}

function transseat(){
	FlashAgentX.transseat();
}

function transseat(){
	FlashAgentX.transseat();
}

function gotoivr(flowtype,rootactid,actid,uudata){
	FlashAgentX.gotoivr(flowtype,rootactid, actid, uudata);
}

function inmeet(){
	FlashAgentX.inmeet();
}

function outmeet(){
	FlashAgentX.outmeet();
}

function monitor(agentid){
	FlashAgentX.monitor(agentid);
}

function outmonitor(agentid){
	FlashAgentX.outmonitor(agentid);
}

function insert(){
	FlashAgentX.insert();
}

function outinsert(){
	FlashAgentX.outinsert();
}

function whisper(){
	FlashAgentX.whisper();
}

function outwhisper(){
	FlashAgentX.outwhisper();
}

function robcall(){
	FlashAgentX.robcall();
}

function stopcall(){
	FlashAgentX.stopcall();
}

function tocheckout(agentid){
	FlashAgentX.tocheckout(agentid);
}

function getAgcListState(agentids){
	//alert("getAgcListState::"+funname+agentids);
	FlashAgentX.getAgcListState(agentids);
}

function getEntStateInfo(queueid){
	FlashAgentX.getEntQueueList(queueid);
}

 